Claude Code: Tips
Claude Code tips.
General tips
Shift + Tabto cycle through normal, plan, and accept-edits mode.- Use
@to mention specific files.
Permission modes
Shift+Tab cycles through three modes: default, auto-accept edits, and plan. bypassPermissions is intentionally excluded from this cycle by default.
If you’re comfortable using bypass permissions mode regularly, set it as your default in ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "bypassPermissions"
}
}
With this config, Claude Code starts in bypass permissions mode, and Shift+Tab will include it in the cycle so you can freely switch between modes.
tmux + Neovim Setup
If you prefer terminal-based light-weight setup over IDEs like cursor, a nice way is to have a tmux session per project with Claude Code and an editor (e.g., Neovim) open side by side. You read, check, and edit with Neovim while asking things to Claude Code. When doing this, it is critical for Neovim to auto-reload files when Claude Code edits them externally. Without this setup, you’ll be viewing stale files unless you force-reload with :e!, which creates an annoying situation with unsaved edits in the current buffer that diverged from the file content.
To do so, you have to configure tmux correctly in addition to Neovim.
Neovim configuration
Add to your Neovim config (e.g., lua/user/options.lua):
-- Auto-reload files when changed externally
vim.o.autoread = true
vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, {
command = 'checktime',
})
tmux configuration
Add to your tmux.conf:
set -g focus-events on
This tells tmux to forward focus events to Neovim. Without it, Neovim won’t know when you switch back to it and won’t trigger the FocusGained autocmd.
Applying changes
For Neovim, restart or source your config. For tmux, either restart tmux, or run tmux set -g focus-events on in the terminal, or run Ctrl+a (or your prefix) then : and type set -g focus-events on inside tmux.
Tools
- RTK — CLI proxy that reduces LLM token consumption by 60–90% by filtering and compressing command outputs